package com.blockmeta.bbs.immodule.net.pojo;

import com.blockmeta.bbs.baselibrary.utils.TimeUtil;
import com.blockmeta.bbs.immodule.bean.beaninterface.IFriendsEntry;
import com.blockmeta.bbs.immodule.dao.IMUserEntity;
import com.blockmeta.bbs.immodule.utils.IMUtils;

import java.io.Serializable;

/**
 * @author AirThor
 * @date 2019/3/22.
 */
public class IMUserEntityBook extends IMUserEntity implements IFriendsEntry,Serializable {
    private String letter;
    private boolean checked;

    public void setLetter(String letter) {
        this.letter = letter;
    }

    @Override
    public String getLetter() {
        return letter;
    }

    @Override
    public String getAvatar() {
        return getAvatarPath();
    }

    @Override
    public int getGrade() {
        return getUserLevel();
    }

    @Override
    public String getGradeTag() {
        return IMUtils.UserLevel.getUserLevel(getUserLevel()).getValue();
    }

    @Override
    public String getRegistrationTime() {
        return TimeUtil.getUserRegisterAge(getDate());
    }

    @Override
    public boolean getCheckedState() {
        return checked;
    }

    @Override
    public void setCheckedState(boolean checked) {
        this.checked = checked;
    }

    @Override
    public long getChatGroupId() {
        return 0;
    }
}
